<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="common">
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div class="panel-body">
    <div style="display:inline-block;">
        <div style="float:left;">
            <input id="wardenOperate" class="form-control" style="width:200px;" placeholder="查询操作" />
        </div>
        <div style="float:left;margin-left:20px;">
            <button id="query" class="btn btn-primary">查询</button>
        </div>
    </div>
</div>
<table id="adminInfoTable"></table>

</body>
<script>
    $(function (){
        queryadministrator();
    })
    function  queryadministrator(){
        $("#adminInfoTable").bootstrapTable({
            url:"../administrator/findAdministrator", //user是映射的类，queryUserInfo,是映射的方法
            columns:[
                {checkbox: true,visible: true },//是否显示复选框
                {field:'id',title:'id',sortable:true},
                {field:'wardenId',title:'管理员iD',sortable:true},
                {field:'wardenNum',title:'管理员帐号',sortable:true},
                {field:'wardenOperate',title:'操作',sortable:true},
                {field:'wardenDate',title:'时间',sortable:true,sortable:true},
            ],
            queryParams: function (params) {
                return {
                    wardenOperate: $('#wardenOperate').val(),
                };
            },
            //开启分页以后，默认会传入两个参数,而这两个参数，直接是mysql的分页计算后的数据
            pagination:true,
            pageSize:2,
            pageList:[2,4,6,8,10],
            sidePagination : 'client',//server:服务器端分页{rows:[],total:10}|client：前端分页 [{},{}]
        })}

    //条查的按钮方法
    $('#query').click(function () {
        $('#adminInfoTable').bootstrapTable('refresh')
    })
</script>
</html>